import { createRouter, createWebHistory } from 'vue-router'

import Layout from '@/views/Layout/layout.vue'
import HomePage from '@/views/HomePage/homepage.vue'
import FindPage from '@/views/FindPage/findpage.vue'
import InformPage from '@/views/InformPage/informpage.vue'
import MessagePage from '@/views/MessagePage/messagepage.vue'
import PersonagePage from '@/views/PersonagePage/personagepage.vue'
import LogPage from '@/views/LogPage/logpage.vue'


const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/',
      name: 'main',
      component: Layout,
      redirect: '/home',
      children: [
        {path: 'home',name: 'home',component: HomePage},
        {path: 'find',name: 'find',component: FindPage},
        {path: 'inform',name: 'inform',component: InformPage},
        {path: 'message',name: 'message',component: MessagePage},
        {path: 'personage',name: 'personage',component: PersonagePage}
      ]
    },
    {
      path: '/log',name: 'log',component: LogPage,
    }
  ]
})

export default router
